﻿using DbFrame.BaseClass;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbFrame.Core.Interface
{
    public interface IQueryMappingData
    {
        TReturn Frist<TReturn>();
        List<TReturn> ToList<TReturn>();
        //
        DataTable ToTable();
        List<DbParam> GetDbParam();
        SQL ToSql();
        int Count();
        //
        IQueryMappingData Top(int Top);
        IQueryMappingData Distinct();
        IQueryMappingData TakePage(int PageNumber, int PageSize);
    }

    public interface IQueryMappingData<T>: IQueryMappingData
    {
        T Frist();
        List<T> ToList();
        
    }
}
